package com.bw.crop.controller;

import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.IdUtil;
import com.bw.crop.config.TestLogObjectPool;
import com.bw.crop.domain.SysLogsWarehouse;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

@RestController()
@RequestMapping("/test")
public class TestController {
    public static final Map map=new ConcurrentHashMap<String,SysLogsWarehouse>();
    @RequestMapping("/nis")
    public void test(){
        long snowflake = IdUtil.getSnowflake().nextId();
        try {
            SysLogsWarehouse logsWarehouse = new SysLogsWarehouse();
            map.put("1"+snowflake,logsWarehouse);
        }catch (Exception e){
            System.out.println("vfffffffffff"+e);
        }
    }
}
